#pragma once
#include <vector>
#include "Channel.h"

namespace cutt{
	using std::vector;
	const int CHANNEL_PAGE_SIZE = 7;

	class ChannelPage : public vector<Channel>{
	public:
		int ChannelCount;

		ChannelPage():ChannelCount(0){

		}
	};


	class ChannelPool
	{
	public:
		ChannelPool(void);
		~ChannelPool(void);
	public:
		ChannelPage * getCurrentPage(){
			return m_pages[m_pageIndex];
		}
		ChannelPage * getNextPage(){
			if(++m_pageIndex > 2) m_pageIndex = 0;
			return m_pages[m_pageIndex];
		}
		ChannelPage * getPrevPage(){
			if(--m_pageIndex < 0) m_pageIndex = 2;
			return m_pages[m_pageIndex];
		}
	private:
		ChannelPage m_page0;
		ChannelPage m_page1;
		ChannelPage m_page2;	
		ChannelPage * m_pages[3];
		int m_pageIndex;	
	};
}
